/*
 * @Descripttion: 核酸宝项目前端
 * @version: 
 * @Author: 杜宇轩
 * @Date: 2022-05-22 05:23:33
 * @LastEditors: 杜宇轩
 * @LastEditTime: 2022-05-22 06:23:31
 */
import Vue from 'vue';
const prefix = '/natms/user/';

/**
 * 用户手机号登录
 * request: {
 *  phoneNumber: "",    // 用户手机号
 *  password: ""  // 用户密码
 * }
 */
export const userLoginByPhone = (data) => {
  return Vue.$http({
    url: prefix + 'loginByPhone',
    method: 'post',
    data: {
      phoneNumber: data.phoneNumber,
      password: data.password
    }
  });
};


/**
 * 用户身份证号登录
 * request: {
 *  userId: "",    // 用户身份证号
 *  password: ""  // 用户密码
 * }
 */
export const userLoginByCardId = (data) => {
  return Vue.$http({
    url: prefix + 'loginByCardId',
    method: 'post',
    data: {
      userId: data.userId,
      password: data.password
    }
  });
};
